import request from '@/utils/request';

//获取企业商品分类列表
export async function fetchListGoodsCategory(params) {
  return request('/goods/goodsCategory/listGoodsCategory', {
    params,
  });
}

// post 新增商品分类
export async function fakeInsertGoodsCategory(data) {
  return request('/goods/goodsCategory/insertGoodsCategory', {
    method: 'post',
    data,
  });
}

// post 修改商品分类
export async function fakeUpdateGoodsCategory(data) {
  return request('/goods/goodsCategory/updateGoodsCategory', {
    method: 'post',
    data,
  });
}
// post 删除商品分类
export async function fakeDeleteGoodsCategory(data) {
  return request('/goods/goodsCategory/deleteGoodsCategory', {
    method: 'post',
    data,
  });
}

//搜索实物商品
export async function fetchListOfflineGoods(params) {
  return request('/goods/offlineGoods/listOfflineGoods', {
    params,
  });
}

//实物商品详情
export async function fetchOfflineGoodsDetail(params) {
  return request('/goods/offlineGoods/getOfflineGoodsDetail', {
    params,
  });
}

// post 删除商品分类
export async function fakeDeleteOfflineGoods(data) {
  return request('/goods/offlineGoods/deleteOfflineGoods', {
    method: 'post',
    data,
  });
}
// post 下架实物商品
export async function fakeDownOfflineGoods(data) {
  return request('/goods/offlineGoods/downOfflineGoods', {
    method: 'post',
    data,
  });
}
// post 保存实物商品
export async function fakeSaveOfflineGoods(data) {
  return request('/goods/offlineGoods/saveOfflineGoods', {
    method: 'post',
    data,
  });
}
// post 上架实物商品
export async function fakeUpOfflineGoods(data) {
  return request('/goods/offlineGoods/upOfflineGoods', {
    method: 'post',
    data,
  });
}

// post 修改规格的时候检查sku时候挂在其他商品下面打包售卖
export async function fakeCheckChangeSku(data) {
  return request('/goods/checkChangeSku', {
    method: 'post',
    data,
  });
}
// post 上架实物商品
export async function fakeCheckRemoveGoods(data) {
  return request('/goods/checkRemoveGoods', {
    method: 'post',
    data,
  });
}
